import { TOOLBAR_BUTTON_TYPES } from '@ohif/core';

const definitions = [
  {
    id: 'studies',
    label: 'Studies',
    icon: 'studies',
    type: TOOLBAR_BUTTON_TYPES.STATE,
    commandName: 'showHideStudiesPanel',
    options: {
      keys: ['preferences.sidePanels.study-browser.show'],
      values: [true],
    },
    buttons: [
      {
        id: 'studies-auto',
        label: 'Auto',
        icon: 'auto',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setStudiesPanelPos',
        commandOptions: { pos: 'auto' },
        options: {
          keys: ['preferences.sidePanels.study-browser.pos'],
          values: ['auto'],
        }
      },
      {
        id: 'studies-left',
        label: 'Left',
        icon: 'left',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setStudiesPanelPos',
        commandOptions: { pos: 'left' },
        options: {
          keys: ['preferences.sidePanels.study-browser.pos'],
          values: ['left'],
        }
      },
      {
        id: 'studies-right',
        label: 'Right',
        icon: 'right',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setStudiesPanelPos',
        commandOptions: { pos: 'right' },
        options: {
          keys: ['preferences.sidePanels.study-browser.pos'],
          values: ['right'],
        }
      },
      {
        id: 'studies-top',
        label: 'Top',
        icon: 'top',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setStudiesPanelPos',
        commandOptions: { pos: 'top' },
        options: {
          keys: ['preferences.sidePanels.study-browser.pos'],
          values: ['top'],
        }
      },
      {
        id: 'studies-bottom',
        label: 'Bottom',
        icon: 'bottom',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setStudiesPanelPos',
        commandOptions: { pos: 'bottom' },
        options: {
          keys: ['preferences.sidePanels.study-browser.pos'],
          values: ['bottom'],
        }
      },
    ]
  },
  {
    id: "SeriesLayout",
    label: "Series Layout",
    icon: 'series-layout',
    className: 'hideOnPhone',
    buttons: [
      {
        id: 'SL-1X1',
        label: '1 X 1',
        icon: 'layout-1x1',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setSeriesLayout',
        commandOptions: { numRows: 1, numColumns: 1 },
        options: {
          keys: [
            'viewports.numRows',
            'viewports.numColumns',
          ],
          values: [1, 1],
        }
      },
      {
        id: 'SL-1X2',
        label: '1 X 2',
        icon: 'layout-1x2',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setSeriesLayout',
        commandOptions: { numRows: 1, numColumns: 2 },
        options: {
          keys: [
            'viewports.numRows',
            'viewports.numColumns',
          ],
          values: [1, 2],
        }
      },
      {
        id: 'SL-2X1',
        label: '2 X 1',
        icon: 'layout-2x1',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setSeriesLayout',
        commandOptions: { numRows: 2, numColumns: 1 },
        options: {
          keys: [
            'viewports.numRows',
            'viewports.numColumns',
          ],
          values: [2, 1],
        }
      },
      {
        id: 'SL-2X2',
        label: '2 X 2',
        icon: 'layout-2x2',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setSeriesLayout',
        commandOptions: { numRows: 2, numColumns: 2 },
        options: {
          keys: [
            'viewports.numRows',
            'viewports.numColumns',
          ],
          values: [2, 2],
        }
      },
      {
        id: 'SL-1X3',
        label: '1 X 3',
        icon: 'layout-1x3',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setSeriesLayout',
        commandOptions: { numRows: 1, numColumns: 3 },
        options: {
          keys: [
            'viewports.numRows',
            'viewports.numColumns',
          ],
          values: [1, 3],
        }
      },
      {
        id: 'SL-3X1',
        label: '3 X 1',
        icon: 'layout-3x1',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setSeriesLayout',
        commandOptions: { numRows: 3, numColumns: 1 },
        options: {
          keys: [
            'viewports.numRows',
            'viewports.numColumns',
          ],
          values: [3, 1],
        }
      },
      {
        id: 'SL-2X3',
        label: '2 X 3',
        icon: 'layout-2x3',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setSeriesLayout',
        commandOptions: { numRows: 2, numColumns: 3 },
        options: {
          keys: [
            'viewports.numRows',
            'viewports.numColumns',
          ],
          values: [2, 3],
        }
      },
      {
        id: 'SL-3X2',
        label: '3 X 2',
        icon: 'layout-3x2',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setSeriesLayout',
        commandOptions: { numRows: 3, numColumns: 2 },
        options: {
          keys: [
            'viewports.numRows',
            'viewports.numColumns',
          ],
          values: [3, 2],
        }
      },
      {
        id: 'SL-3X3',
        label: '3 X 3',
        icon: 'layout-3x3',
        type: TOOLBAR_BUTTON_TYPES.STATE,
        commandName: 'setSeriesLayout',
        commandOptions: { numRows: 3, numColumns: 3 },
        options: {
          keys: [
            'viewports.numRows',
            'viewports.numColumns',
          ],
          values: [3, 3],
        }
      },
    ],
    context: 'ACTIVE_VIEWPORT::CORNERSTONE',
  },
  // {
  //   id: "ImageLayout",
  //   label: "Image Layout",
  //   className: 'hideOnPhone',
  //   icon: 'image-layout',
  //   buttons: [
  //     {
  //       id: 'IL-1X1',
  //       label: '1 X 1',
  //       icon: 'layout-1x1',
  //       type: TOOLBAR_BUTTON_TYPES.STATE,
  //       commandName: 'setImageLayout',
  //       commandOptions: { numRows: 1, numColumns: 1 },
  //       options: {
  //         keys: [
  //           'viewports.layout.viewports.Array.activeViewportIndex.numRows',
  //           'viewports.layout.viewports.Array.activeViewportIndex.numColumns',
  //         ],
  //         values: [1, 1],
  //       }
  //     },
  //     {
  //       id: 'IL-1X2',
  //       label: '1 X 2',
  //       icon: 'layout-1x2',
  //       type: TOOLBAR_BUTTON_TYPES.STATE,
  //       commandName: 'setImageLayout',
  //       commandOptions: { numRows: 1, numColumns: 2 },
  //       options: {
  //         keys: [
  //           'viewports.layout.viewports.Array.activeViewportIndex.numRows',
  //           'viewports.layout.viewports.Array.activeViewportIndex.numColumns',
  //         ],
  //         values: [1, 2],
  //       }
  //     },
  //     {
  //       id: 'IL-2X1',
  //       label: '2 X 1',
  //       icon: 'layout-2x1',
  //       type: TOOLBAR_BUTTON_TYPES.STATE,
  //       commandName: 'setImageLayout',
  //       commandOptions: { numRows: 2, numColumns: 1 },
  //       options: {
  //         keys: [
  //           'viewports.layout.viewports.Array.activeViewportIndex.numRows',
  //           'viewports.layout.viewports.Array.activeViewportIndex.numColumns',
  //         ],
  //         values: [2, 1],
  //       }
  //     },
  //     {
  //       id: 'IL-2X2',
  //       label: '2 X 2',
  //       icon: 'layout-2x2',
  //       type: TOOLBAR_BUTTON_TYPES.STATE,
  //       commandName: 'setImageLayout',
  //       commandOptions: { numRows: 2, numColumns: 2 },
  //       options: {
  //         keys: [
  //           'viewports.layout.viewports.Array.activeViewportIndex.numRows',
  //           'viewports.layout.viewports.Array.activeViewportIndex.numColumns',
  //         ],
  //         values: [2, 2],
  //       }
  //     },
  //     {
  //       id: 'IL-1X3',
  //       label: '1 X 3',
  //       icon: 'layout-1x3',
  //       type: TOOLBAR_BUTTON_TYPES.STATE,
  //       commandName: 'setImageLayout',
  //       commandOptions: { numRows: 1, numColumns: 3 },
  //       options: {
  //         keys: [
  //           'viewports.layout.viewports.Array.activeViewportIndex.numRows',
  //           'viewports.layout.viewports.Array.activeViewportIndex.numColumns',
  //         ],
  //         values: [1, 3],
  //       }
  //     },
  //     {
  //       id: 'IL-3X1',
  //       label: '3 X 1',
  //       icon: 'layout-3x1',
  //       type: TOOLBAR_BUTTON_TYPES.STATE,
  //       commandName: 'setImageLayout',
  //       commandOptions: { numRows: 3, numColumns: 1 },
  //       options: {
  //         keys: [
  //           'viewports.layout.viewports.Array.activeViewportIndex.numRows',
  //           'viewports.layout.viewports.Array.activeViewportIndex.numColumns',
  //         ],
  //         values: [3, 1],
  //       }
  //     },
  //     {
  //       id: 'IL-2X3',
  //       label: '2 X 3',
  //       icon: 'layout-2x3',
  //       type: TOOLBAR_BUTTON_TYPES.STATE,
  //       commandName: 'setImageLayout',
  //       commandOptions: { numRows: 2, numColumns: 3 },
  //       options: {
  //         keys: [
  //           'viewports.layout.viewports.Array.activeViewportIndex.numRows',
  //           'viewports.layout.viewports.Array.activeViewportIndex.numColumns',
  //         ],
  //         values: [2, 3],
  //       }
  //     },
  //     {
  //       id: 'IL-3X2',
  //       label: '3 X 2',
  //       icon: 'layout-3x2',
  //       type: TOOLBAR_BUTTON_TYPES.STATE,
  //       commandName: 'setImageLayout',
  //       commandOptions: { numRows: 3, numColumns: 2 },
  //       options: {
  //         keys: [
  //           'viewports.layout.viewports.Array.activeViewportIndex.numRows',
  //           'viewports.layout.viewports.Array.activeViewportIndex.numColumns',
  //         ],
  //         values: [3, 2],
  //       }
  //     },
  //     {
  //       id: 'IL-3X3',
  //       label: '3 X 3',
  //       icon: 'layout-3x3',
  //       type: TOOLBAR_BUTTON_TYPES.STATE,
  //       commandName: 'setImageLayout',
  //       commandOptions: { numRows: 3, numColumns: 3 },
  //       options: {
  //         keys: [
  //           'viewports.layout.viewports.Array.activeViewportIndex.numRows',
  //           'viewports.layout.viewports.Array.activeViewportIndex.numColumns',
  //         ],
  //         values: [3, 3],
  //       }
  //     },
  //   ],
  //   context: 'ACTIVE_VIEWPORT::CORNERSTONE',
  // },
];

export default {
  definitions,
  defaultContext: 'VIEWER',
};
